<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Redis;

class IndexController extends Controller
{
    public function index(){
        //获取用户信息
        $user = session()->get('userinfo');
        //从redis 中获取信息
        $userinfo = Redis::hgetall('user:userinfo:'.$user['user_id']);

        return view('admin.admin',compact('userinfo'));
    }
    public function welcome(){
        return view('admin.welcome');
    }
}
